<!DOCTYPE html>
<html lang="zh" xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no">
    <title>微笑计划管理后台 </title>
    <!-- BEGIN GLOBAL MANDATORY STYLES -->
    <link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700" rel="stylesheet">
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/plugins.css" rel="stylesheet" type="text/css" />
    <!-- END GLOBAL MANDATORY STYLES -->

    <!-- BEGIN PAGE LEVEL CUSTOM STYLES -->
    <link rel="stylesheet" type="text/css" href="/plugins/table/datatable/datatables.css">
    <link rel="stylesheet" type="text/css" href="/plugins/table/datatable/custom_dt_html5.css">
    <link rel="stylesheet" type="text/css" href="/plugins/table/datatable/dt-global_style.css">
    <link th:href="@{/plugins/notification/snackbar/snackbar.min.css}" rel="stylesheet" type="text/css" />
	<link href="/assets/css/elements/custom-pagination.css" rel="stylesheet" type="text/css">
	<link href="/assets/css/elements/search.css" rel="stylesheet" type="text/css">
    <!-- END PAGE LEVEL CUSTOM STYLES -->
</head>
<body class="sidebar-noneoverflow">

    <!--  BEGIN NAVBAR  -->
    <div class="header-container fixed-top">
        <header class="header navbar navbar-expand-sm">
            <a href="javascript:void(0);" class="sidebarCollapse" data-placement="bottom"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></a>
            <ul class="navbar-item flex-row">
            </ul>
            <ul class="navbar-item flex-row search-ul">
            </ul>
            <ul class="navbar-item flex-row navbar-dropdown">
                <li class="nav-item dropdown user-profile-dropdown  order-lg-0 order-1">
                    <a href="javascript:void(0);" class="nav-link dropdown-toggle user" id="userProfileDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
                    </a>
                    <div class="dropdown-menu position-absolute" aria-labelledby="userProfileDropdown">
                        <div class="">
                            <div class="dropdown-item">
                                <a class="" href="/admin/userinfo"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>个人资料</a>
                            </div>
                            <div class="dropdown-item">
                                <a class="" href="/addmin/out"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>退出登录</a>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </header>
    </div>
    <!--  END NAVBAR  -->

    <!--  BEGIN MAIN CONTAINER  -->
    <div class="main-container" id="container">

        <div class="overlay"></div>
        <div class="cs-overlay"></div>
        <div class="search-overlay"></div>

        <!--  BEGIN SIDEBAR  -->
        <div class="sidebar-wrapper sidebar-theme">

            <nav id="sidebar">

               <ul class="navbar-nav theme-brand flex-row  text-center">

                   <li class="nav-item theme-text">
                       <a href="/admin" class="nav-link"> 微笑计划 </a>
                   </li>
                   <li class="nav-item toggle-sidebar">
                       <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left sidebarCollapse"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>
                   </li>
               </ul>

                <div class="shadow-bottom"></div>


                <ul class="list-unstyled menu-categories" id="accordionExample">

					<li class="menu">
					    <a href="#dashboard" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle collapsed">
					        <div class="">
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
					            <span>仪表盘</span>
					        </div>
					        <div>
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
					        </div>
					    </a>
					    <ul class="submenu recent-submenu mini-recent-submenu list-unstyled collapse" id="dashboard" data-parent="#accordionExample">
					        <li class="active">
					            <a href="/admin"> 数据统计 </a>
					        </li>
					    </ul>
					</li>

					<li class="menu active">
					    <a href="#userMager" data-toggle="collapse" aria-expanded="true" class="dropdown-toggle">
					        <div class="">
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
                                    <span>会员</span><span>会员</span>
					        </div>
					        <div>
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
					        </div>
					    </a>
						<ul class="collapse submenu recent-submenu mini-recent-submenu list-unstyled show" id="userMager" data-parent="#accordionExample">
							<li class="active">
								<a href="/admin/userList"> 会员列表 </a>
							</li>
							<li class="">
								<a href="/admin/userListAngel"> 天使列表 </a>
							</li>
							<li class="">
								<a href="/admin/userListCity"> 市代列表 </a>
							</li>
							<li class="">
								<a href="/admin/userListProvince"> 省代列表 </a>
							</li>
							<li class="">
								<a href="/admin/userListPartner"> 分公司列表 </a>
							</li>
						</ul>
					</li>





					<li class="menu">
					    <a href="#shopMager" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle collapsed">
					        <div class="">
					            <svg t="1616857683050" class="icon" viewBox="0 0 1170 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3316" width="108" height="108"><path d="M103.619 387.95c1.658 107.617 43.057 155.16 129.95 155.16 94.404 0 145.457-28.282 161.597-83.87l25.942-89.527 29.842 88.259c19.505 57.539 62.123 85.138 134.632 85.138 72.996 0 118.004-28.087 140.922-86.455l22.43-57.051 30.232 53.345c53.151 93.672 115.42 122.051 194.707 92.063 78.458-29.647 107.276-89.332 88.259-188.855l-139.8-259.755H251.513L103.619 387.998z m129.95 213.674c-123.66 0-188.562-77.921-188.562-220.55v-7.07l155.16-305.737a55.442 55.442 0 0 1 49.494-30.379h674.572c20.383 0 39.107 11.215 48.762 29.16l142.775 265.264 2.926 8.095c25.99 128.634-16.043 218.502-124.1 259.364-93.964 35.5-175.201 8.875-238.494-75.337-36.815 51.103-94.598 77.19-170.472 77.19-72.411 0-127.414-23.893-162.182-70.558-37.059 47.153-101.522 70.558-189.83 70.558z m-115.224 83.773a29.257 29.257 0 1 1 58.514 0v228.304c0 12.678 10.338 23.064 23.114 23.064h754.736a23.064 23.064 0 0 0 23.065-23.064V685.397a29.257 29.257 0 1 1 58.514 0v228.304c0 45.056-36.523 81.578-81.579 81.578H199.973c-45.105 0-81.628-36.571-81.628-81.578V685.397z" p-id="3317" fill="#888ea8"></path><path d="M243.76 358.205a29.257 29.257 0 1 1 0-58.514h669.16a29.257 29.257 0 1 1 0 58.514H243.76z" p-id="3318" fill="#888ea8"></path></svg>
					            <span>商城</span>
					        </div>
					        <div>
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
					        </div>
					    </a>
					    <ul class="submenu recent-submenu mini-recent-submenu list-unstyled collapse" id="shopMager" data-parent="#accordionExample">
							<li class="">
								<a href="/admin/shopGoodsMenu"> 商品分类 </a>
							</li>
							<li class="">
					            <a href="/admin/shopGoodsList"> 商品管理 </a>
					        </li>
							<li class="">
							    <a href="/admin/shopOrderList?type=3"> 订单管理（全部） </a>
							</li>
							<li class="">
								<a href="/admin/shopOrderList?type=0"> 待发货 </a>
							</li>
							<li class="">
								<a href="/admin/shopOrderList?type=1"> 待收货 </a>
							</li>
							<li class="">
								<a href="/admin/shopOrderList?type=2"> 已完成 </a>
							</li>
					    </ul>
					</li>


					<li class="menu">
					    <a href="#uniappMager" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle collapsed">
					        <div class="">
					            <svg t="1616857400944" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2079" width="108" height="108"><path d="M512 64c247.424 0 448 200.576 448 448S759.424 960 512 960 64 759.424 64 512 264.576 64 512 64z m0 64c-212.077 0-384 171.923-384 384s171.923 384 384 384 384-171.923 384-384-171.923-384-384-384z m104.284 141.363c74.637 0 135.363 60.726 135.363 135.363 0 52.558-30.834 100.8-78.545 122.887a31.842 31.842 0 0 1-13.405 2.966 31.958 31.958 0 0 1-29.026-18.542c-7.341-15.858-0.58-34.636 15.099-42.206l0.477-0.226c25.2-11.665 41.477-37.128 41.477-64.88 0-39.394-32.045-71.439-71.44-71.439-39 0-70.798 31.408-71.43 70.26l-0.01 1.18c0 0.879-0.043 1.792-0.128 2.78l-0.01 0.214V618.04h-0.362v2.5c0 74.638-60.726 135.363-135.362 135.363-74.637 0-135.363-60.725-135.363-135.362 0-52.586 30.856-100.838 78.601-122.915 16.02-7.41 35.015-0.427 42.425 15.596 7.335 15.862 0.565 34.637-15.118 42.2l-0.478 0.225c-25.217 11.66-41.507 37.127-41.507 64.894 0 39.394 32.045 71.439 71.44 71.439 39.394 0 71.439-32.045 71.439-71.44 0-1.603 0.12-3.205 0.358-4.791l0.028-0.185-0.001-208.338h0.116v-2.5c0-73.89 59.516-134.146 133.127-135.344l2.235-0.018z" p-id="2080" fill="#888ea8"></path></svg>
					            <span>小程序</span>
					        </div>
					        <div>
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
					        </div>
					    </a>
					    <ul class="submenu recent-submenu mini-recent-submenu list-unstyled collapse" id="uniappMager" data-parent="#accordionExample">
					        <li class="">
					            <a href="/admin/uniIndex"> 首页排版 </a>
					        </li>
							<li class="">
					            <a href="/admin/uniSwiper"> 首页轮播 </a>
					        </li>
							<li class="">
							    <a href="/admin/uniHome"> 微笑计划排版 </a>
							</li>
					    </ul>
					</li>


					<li class="menu">
					    <a href="#articleMager" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle collapsed">
					        <div class="">
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
					            <span>文章管理</span>
					        </div>
					        <div>
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
					        </div>
					    </a>
					    <ul class="submenu recent-submenu mini-recent-submenu list-unstyled collapse" id="articleMager" data-parent="#accordionExample">
					        <li class="">
								<a href="/admin/articleList"> 文章列表 </a>
					        </li>
						</ul>
					</li>

					<li class="menu">
					    <a href="#moneyMager" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle collapsed">
					        <div class="">
					            <svg t="1616857765295" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4246" width="108" height="108"><path d="M639.414168 336.899827H588.780264a16.618153 16.618153 0 0 0-14.739492 8.733774L511.795146 463.669454l-62.235633-118.035853a16.618153 16.618153 0 0 0-14.739492-8.733774h-50.643897a7.994301 7.994301 0 0 0-7.374742 11.621715l73.947284 140.270003h-50.873733a15.988602 15.988602 0 0 0-15.988602 15.988602v23.982903a15.988602 15.988602 0 0 0 15.988602 15.988602h79.943009v47.965805h-79.943009a15.988602 15.988602 0 0 0-15.988602 15.988602v23.982903a15.988602 15.988602 0 0 0 15.988602 15.988602h79.943009v63.954407a15.988602 15.988602 0 0 0 15.988602 15.988602h31.977204a15.988602 15.988602 0 0 0 15.988602-15.988602v-63.954407h79.943009a15.988602 15.988602 0 0 0 15.988602-15.988602v-23.982903a15.988602 15.988602 0 0 0-15.988602-15.988602h-79.943009v-47.965805h79.943009a15.988602 15.988602 0 0 0 15.988602-15.988602v-23.982903a15.988602 15.988602 0 0 0-15.988602-15.988602h-50.883725l73.947283-140.270003a7.994301 7.994301 0 0 0-7.364749-11.621715z" p-id="4247" fill="#888ea8"></path><path d="M511.405424 113.059401c-220.752628 0-399.715047 178.962419-399.715047 399.715047s178.962419 399.715047 399.715047 399.715047 399.715047-178.962419 399.715047-399.715047-178.962419-399.715047-399.715047-399.715047zM754.462151 755.851161A342.505831 342.505831 0 1 1 828.169606 646.539088 342.67571 342.67571 0 0 1 754.462151 755.851161z" p-id="4248" fill="#888ea8"></path></svg>
					            <span>资金记录</span>
					        </div>
					        <div>
					            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><polyline points="9 18 15 12 9 6"></polyline></svg>
					        </div>
					    </a>
					    <ul class="submenu recent-submenu mini-recent-submenu list-unstyled collapse" id="moneyMager" data-parent="#accordionExample">
							<li class="">
								<a href="/admin/shopCzList"> 充值记录 </a>
							</li>
							<li class="">
								<a href="/admin/shopSyList"> 收益记录 </a>
							</li>
						</ul>
					</li>

                </ul>
            </nav>

        </div>
        <!--  END SIDEBAR  -->

        <!--  BEGIN CONTENT AREA  -->
        <div id="content" class="main-content">

			<!-- Modal -->
			<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
			    <div class="modal-dialog" role="document">
			        <div class="modal-content">
			            <div class="modal-header">
			                <h5 class="modal-title" id="exampleModalLabel">充值积分</h5>
			                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
			                </button>
			            </div>
			            <div class="modal-body">
			               <div class="form-group">
			                 <label for="gift">当前余额</label>
			                 <input type="email" class="form-control" id="gift" value="0" disabled="false">
			                 <small id="emailHelp" class="form-text text-muted">会员此时账户余额</small>
			               </div>
			               <div class="form-group">
			                 <label for="money">转入积分</label>
			                 <input type="number" class="form-control" id="money" >
			               </div>
                            <div class="form-group">
                                <label for="gift">积分备注</label>
                                <input type="text" class="form-control" id="explain">
                                <small id="explainHelp" class="form-text text-muted">备注仅用于管理员查看</small>
                            </div>
			            </div>
			            <div class="modal-footer">
			                <button class="btn" data-dismiss="modal" onclick="clear()"><i class="flaticon-cancel-12"></i> 关闭</button>
			                <button type="button" class="btn btn-primary" onclick="pay()">确定充值</button>
			            </div>
			        </div>
			    </div>
			</div>



			<!-- Modal -->
			<div class="modal fade" id="updateLevel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title">等级升级</h5>
							<button type="button" class="close" data-dismiss="modal" aria-label="Close">
							</button>
						</div>
						<div class="modal-body">
							<div class="form-group">
								<label for="gift">当前等级</label>
								<input type="text" class="form-control" id="level"  disabled="false">
							</div>
							<div class="form-group">
								<label for="money">升后等级</label>
								<input type="text" class="form-control" id="after" disabled="false" >
							</div>
						</div>
						<div class="modal-footer">
							<button class="btn" data-dismiss="modal" onclick="clear()"><i class="flaticon-cancel-12"></i> 关闭</button>
							<button type="button" class="btn btn-primary" onclick="levelUpdate()">确定升级</button>
						</div>
					</div>
				</div>
			</div>


            <div class="layout-px-spacing">

                <div class="row layout-top-spacing" id="cancel-row">

					<div class="col-lg-8 col-md-8 col-sm-9 filtered-list-search mx-auto">
						<form class="form-inline my-2 my-lg-0 justify-content-center" action="/admin/userList" method="get">
							<div class="w-100">
								<input type="text" class="w-100 form-control product-search br-30" name="phone" id="input-search" placeholder="请输入会员手机号">
								<button class="btn btn-primary" type="submit"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></button>
							</div>
						</form>
					</div>

                    <div class="col-xl-12 col-lg-12 col-sm-12  layout-spacing">
                        <div class="widget-content widget-content-area br-6">
                            <div class="table-responsive mb-4 mt-4">
                                <table id="html5-extension" class="table table-hover non-hover" style="width:100%">
                                    <thead>
                                        <tr>
											<th>ID</th>
                                            <th>头像</th>
                                            <th>姓名</th>
                                            <th>手机号</th>
                                            <th>积分</th>
                                            <th>等级</th>
                                            <th>会员数</th>
											<th>绑定上级</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr th:each="user:${userList.getContent()}" >
											<td th:text="${user.id}"></td>
                                            <td>
                                                <div class="d-flex">
                                                    <div class="usr-img-frame mr-2 rounded-circle">
                                                        <img alt="avatar" class="img-fluid rounded-circle" th:src="${user.head}">
                                                    </div>
                                                </div>
                                            </td>
                                            <td th:onclick="isAdmin('[[${user.id}]]','[[${user.isAdmin}]]')" >[[${user.name}]] <span class="badge badge-secondary" th:if="${user.isAdmin==1}">管理 </span></td>
                                            <td th:text="${user.phone}"></td>
                                            <td th:onclick="gift('[[${user.id}]]')" > [[${user.money}]]</td>
                                            <td data-toggle="modal" data-target="#updateLevel" th:onclick="shengji([[${user.id}]],[[${user.levels}]])"><span style="background-color: #e7515a;color: #ffffff;padding: 5px 20px;border-radius: 5px">[[${user.levels}]]</span></td>
											<td th:if="${user.down==1}" th:onclick="tuandui('[[${user.id}]]')"><span style="background-color: #8dbf42;color: #ffffff;padding: 5px 20px;border-radius: 5px;font-weight: bolder">[[${user.num}]]</span></td>
											<td th:if="${user.down==0}"><span style="background-color: #8dbf42;color: #000000;padding: 5px 20px;border-radius: 5px;filter:alpha(opacity=50);opacity: 0.5;">0</span></td>


											<td th:if="${user.agent==0}"><span style="background-color: #e2a03f;color: #ffffff;padding: 5px 20px;border-radius: 5px;" th:onclick="agent([[${user.id}]])">未绑定</span></td>
											<td th:if="${user.agent==1}"><span style="background-color: #e2a03f;color: #ffffff;padding: 5px 20px;border-radius: 5px;filter:alpha(opacity=50);opacity: 0.5;">已绑定</span></td>

                                            <td>
                                                <button class="btn btn-info mb-2" data-toggle="modal" data-target="#exampleModal" th:onclick="chongzhi('[[${user.id}]]','[[${user.money}]]')">充值</button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>


									<div class="paginating-container pagination-solid">
										<ul class="pagination">
										<p>当前<span th:text="${userList.getNumber()} + 1"></span>页,总<span th:text="${userList.totalPages}"></span>页
											　共<span th:text="${userList.totalElements}"></span>条记录
											<a th:href="@{/admin/userList}">首页</a>
											<a th:href="@{/admin/userList(pageNum = ${userList.hasPrevious()} ? ${userList.getNumber() } : 1)}">上一页</a>
											<a th:href="@{/admin/userList(pageNum = ${userList.hasNext()} ? ${userList.getNumber()} + 2 : ${userList.totalPages})}">下一页</a>
											<a th:href="@{/admin/userList(pageNum = ${userList.totalPages})}">尾页</a></p>
										</ul>
									</div>

                            </div>

                        </div>
                    </div>
                </div>

                </div>
        <div class="footer-wrapper">
                <div class="footer-section f-section-1">
                    <p class="">Copyright © 2021 郑州灵之动网络科技有限公司</p>
                </div>

            </div>
        </div>
        <!--  END CONTENT AREA  -->

    </div>
    <!-- END MAIN CONTAINER -->



    <!-- BEGIN GLOBAL MANDATORY SCRIPTS -->
    <script th:src="@{/plugins/notification/snackbar/snackbar.min.js}"></script>
    <script src="/assets/js/libs/jquery-3.1.1.min.js"></script>
    <script src="/bootstrap/js/popper.min.js"></script>
    <script src="/bootstrap/js/bootstrap.min.js"></script>
    <script src="/plugins/perfect-scrollbar/perfect-scrollbar.min.js"></script>
    <script src="/assets/js/app.js"></script>



	<script th:src="@{/plugins/sweetalerts/sweetalert2.min.js}"></script>
	<script th:src="@{/plugins/sweetalerts/custom-sweetalert.js}"></script>

    <script>
        $(document).ready(function() {
            App.init();
        });

        var id;
        function clear() {
			id = 0;
			$("#gift").val(0);
			$("#money").val(0);

			$("#level").val("");
			$("#after").val("");
		}



		function isAdmin(ids,type) {
        	let str = "设置";
        	if(type==1){
				str = "取消";
			}
			swal({
				title: '确定'+str+'管理员吗?',
				text: "管理员可接收订货提醒，学习码核销操作",
				type: 'warning',
				showCancelButton: true,
				cancelButtonText:
						'<i class="flaticon-cancel-circle"></i> 取消',
				confirmButtonText: '确定',
				padding: '2em'
			}).then(function(result) {
				if (result.value) {
					$.ajax({
						url: "/admin/isAdmin",
						method: "POST",
						data:{ids:ids},
						header: {
							'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
						},
						success: function (result) {
							if(result.code == "500"){
								Snackbar.show({
									text: result.msg,
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "200"){
								Snackbar.show({
									text: '已'+str+'管理员',
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "100"){
								Snackbar.show({
									text: "您已掉线！",
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.href="/admin/login";
								}, 1500);
							}
						},
						error : function() {
							Snackbar.show({
								text: '请稍后再试',
								pos: 'top-center'
							});
							setTimeout(function (){
								window.location.reload();
							}, 1500);
						}
					})
				}
			})
		}

		function agent(ids) {
			swal({
				title: '确定取消购买绑定限制吗?',
				text: "此操作为手动取消用户购买必须绑定上级限制，点击确定即取消用户限制！",
				type: 'warning',
				showCancelButton: true,
				cancelButtonText:
						'<i class="flaticon-cancel-circle"></i> 取消',
				confirmButtonText: '确定',
				padding: '2em'
			}).then(function(result) {
				if (result.value) {
					$.ajax({
						url: "/admin/agent",
						method: "POST",
						data:{ids:ids},
						header: {
							'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
						},
						success: function (result) {
							if(result.code == "500"){
								Snackbar.show({
									text: result.msg,
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "200"){
								Snackbar.show({
									text: '已取消限制',
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "100"){
								Snackbar.show({
									text: "您已掉线！",
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.href="/admin/login";
								}, 1500);
							}
						},
						error : function() {
							Snackbar.show({
								text: '请稍后再试',
								pos: 'top-center'
							});
							setTimeout(function (){
								window.location.reload();
							}, 1500);
						}
					})
				}
			})
		}

		function shengji(sid,lev) {
        	id = sid;
			$("#level").val(lev);
        	if(lev == '会员'){
				$("#after").val("天使");
			}else if (lev == '天使'){
				$("#after").val("市代");
			}else if (lev == '市代'){
				$("#after").val("省代");
			}else if (lev == '省代'){
				$("#after").val("分公司");
			}else if (lev == '分公司'){
				Snackbar.show({
					text: '已经是顶级，不能升级了',
					pos: 'top-center'
				});
				setTimeout(function (){
					window.location.reload();
				}, 1500);
				return false;
			}
		}
		function levelUpdate() {
			swal({
				title: '确定升级吗?',
				text: "升级后不能恢复！",
				type: 'warning',
				showCancelButton: true,
				cancelButtonText:
						'<i class="flaticon-cancel-circle"></i> 取消',
				confirmButtonText: '确定',
				padding: '2em'
			}).then(function(result) {
				if (result.value) {
					$.ajax({
						url: "/admin/levelUpdate",
						method: "POST",
						data:{ids:id},
						header: {
							'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
						},
						success: function (result) {
							if(result.code == "500"){
								Snackbar.show({
									text: result.msg,
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "200"){
								Snackbar.show({
									text: '升级成功',
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "100"){
								Snackbar.show({
									text: "您已掉线！",
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.href="/admin/login";
								}, 1500);
							}
						},
						error : function() {
							Snackbar.show({
								text: '请稍后再试',
								pos: 'top-center'
							});
							setTimeout(function (){
								window.location.reload();
							}, 1500);
						}
					})
				}else{
					clear();
					$('#updateLevel').modal('hide');
				}
			})
		}
		function tuandui(id) {
			window.location.href = "/admin/member?id="+id;
		}
		function gift(id) {
			window.location.href = "/admin/gift?id="+id;
		}
        function pay() {
        	let money = $("#money").val();
            let explain = $("#explain").val();
           if (!money){
               Snackbar.show({
                   text: '请输入积分',
                   pos: 'top-center'
               });
               return false;
           }
			swal({
				title: '确定充值吗?',
				text: "充值后不能恢复！",
				type: 'warning',
				showCancelButton: true,
				cancelButtonText:
						'<i class="flaticon-cancel-circle"></i> 取消',
				confirmButtonText: '确定',
				padding: '2em'
			}).then(function(result) {
				if (result.value) {
					$.ajax({
						url: "/admin/pay",
						method: "POST",
						data:{id:id,money:money,explain:explain},
						header: {
							'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
						},
						success: function (result) {
							if(result.code == "500"){
								Snackbar.show({
									text: result.msg,
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "200"){
								Snackbar.show({
									text: '充值成功',
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.reload();
								}, 1500);
							}else if(result.code == "100"){
								Snackbar.show({
									text: "您已掉线！",
									pos: 'top-center'
								});
								setTimeout(function (){
									window.location.href="/admin/login";
								}, 1500);
							}
						},
						error : function() {
							Snackbar.show({
								text: '请稍后再试',
								pos: 'top-center'
							});
							setTimeout(function (){
								window.location.reload();
							}, 1500);
						}
					})
				}else{
					clear();
					$('#exampleModal').modal('hide');
				}
			})
        }
        function chongzhi(i,j) {
            $("#gift").val(j);
            id = i;
        }
    </script>
    <script src="/assets/js/custom.js"></script>
    <!-- END GLOBAL MANDATORY SCRIPTS -->

    <!-- BEGIN PAGE LEVEL CUSTOM SCRIPTS -->
    <script src="/plugins/table/datatable/datatables.js"></script>
    <!-- NOTE TO Use Copy CSV Excel PDF Print Options You Must Include These Files  -->
    <script src="/plugins/table/datatable/button-ext/dataTables.buttons.min.js"></script>
    <script src="/plugins/table/datatable/button-ext/jszip.min.js"></script>
    <script src="/plugins/table/datatable/button-ext/buttons.html5.min.js"></script>
    <script src="/plugins/table/datatable/button-ext/buttons.print.min.js"></script>


    <!-- END PAGE LEVEL CUSTOM SCRIPTS -->
</body>
</html>
